"""
Registry system for continual learning components.

This module provides registries for different types of components in the continual learning framework,
allowing for dynamic registration and instantiation of custom implementations.
"""

from .base import (
    Registry,
    RegistryInfo,
    RegistryAware,
    RegistrationError,
    ComponentNotFoundError,
)

# 从instances.py导入优雅的新命名
from .instances import (
    # 主要注册表实例 (新的优雅命名)
    Strategies,
    Models,
    Adapters,
    Callbacks,
    Methods,
    Backbones,
    Heads,
    Hooks,
    HookFactories,
    HookManagers,
    HookAdapters,
    Combiners,
    Routers,
    Components,
    registries,
    # 装饰器 (简洁的小写命名)
    strategy,
    model,
    adapter,
    callback,
    method,
    backbone,
    head,
    hook,
    hook_factory,
    hook_manager,
    hook_adapter,
    combiner,
    router,
    component,
)

# 向后兼容性：保持原有的大写命名（老API）
METHOD_REGISTRY = Methods
BACKBONE_REGISTRY = Backbones
HEAD_REGISTRY = Heads
ADAPTER_REGISTRY = Adapters
CALLBACK_REGISTRY = Callbacks
HOOK_REGISTRY = Hooks
HOOK_FACTORY_REGISTRY = HookFactories
HOOK_MANAGER_REGISTRY = HookManagers
HOOK_ADAPTER_REGISTRY = HookAdapters
COMBINER_REGISTRY = Combiners
ROUTER_REGISTRY = Routers

# 版本信息
__version__ = "2.0.0"

__all__ = [
    # Base classes
    "Registry",
    "RegistryInfo",
    "RegistryAware",
    "RegistrationError",
    "ComponentNotFoundError",
    # 主要注册表 (新的优雅命名 - 推荐使用)
    "Strategies",
    "Models",
    "Adapters",
    "Callbacks",
    "Methods",
    "Backbones",
    "Heads",
    "Hooks",
    "HookFactories",
    "HookManagers",
    "HookAdapters",
    "Combiners",
    "Routers",
    "Components",
    "registries",
    # 装饰器 (简洁命名 - 推荐使用)
    "strategy",
    "model",
    "adapter",
    "callback",
    "method",
    "backbone",
    "head",
    "hook",
    "hook_factory",
    "hook_manager",
    "hook_adapter",
    "combiner",
    "router",
    "component",
    # 向后兼容 (大写格式)
    "METHOD_REGISTRY",
    "BACKBONE_REGISTRY",
    "HEAD_REGISTRY",
    "ADAPTER_REGISTRY",
    "CALLBACK_REGISTRY",
    "HOOK_REGISTRY",
    "HOOK_FACTORY_REGISTRY",
    "HOOK_MANAGER_REGISTRY",
    "HOOK_ADAPTER_REGISTRY",
    "COMBINER_REGISTRY",
    "ROUTER_REGISTRY",
]
